package pl.mmadej.ds4java.ds.list;


import java.util.Iterator;

class UnmodifiableIteratorAdapter<T> implements Iterator<T> {
    private Iterator<T> delegate;

    UnmodifiableIteratorAdapter(Iterator<T> delegate) {
        this.delegate = delegate;
    }

    @Override
    public boolean hasNext() {
        return delegate.hasNext();
    }

    @Override
    public T next() {
        return delegate.next();
    }

    @Override
    public void remove() {
        throw new UnsupportedOperationException();
    }
}
